home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1993…ch: Other People's Memory / ADC Developer CD (1993-03) (''Other People's Memory'')_iso / Dev.CD Mar 93.iso / System Software / QuickTime 1.5 / Interfaces / MediaHandler.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-10-20  |  5.5 KB  |  152 lines  |  [TEXT/MPS ]

  1. /************************************************************
  2.  
  3. Created: Thursday, August 20, 1992 at 12:09 AM
  4.  MediaHandler.h
  5.  C Interface to the Macintosh Libraries
  6.  
  7.  
  8.  Copyright Apple Computer, Inc. 1991, 1992
  9.  All rights reserved
  10.  
  11. ************************************************************/
  12.  
  13. #ifndef __MEDIAHANDLER__
  14. #define __MEDIAHANDLER__
  15.  
  16. #include <Movies.h>
  17.  
  18. enum {
  19.     handlerHasSpatial = 1<<0,
  20.     handlerCanClip = 1<<1,
  21.     handlerCanMatte = 1<<2,
  22.     handlerCanTransferMode = 1<<3,
  23.     handlerNeedsBuffer = 1<<4,
  24.     handlerNoIdle = 1<<5,
  25.     handlerNoScheduler = 1<<6,
  26.     handlerWantsTime = 1<<7,
  27.     handlerCGrafPortOnly = 1<<8
  28. };
  29.  
  30. enum {
  31.     mMustDraw = 1<<3,
  32.     mAtEnd = 1<<4,
  33.     mPreflightDraw = 1<<5
  34. };
  35.     
  36. enum {
  37.     mDidDraw = 1<<0,
  38.     mNeedsToDraw = 1<<2
  39. };
  40.  
  41. typedef struct {
  42.     short version;
  43.     Movie theMovie;
  44.     Track theTrack;
  45.     Media theMedia;
  46.     TimeScale movieScale;
  47.     TimeScale mediaScale;
  48.     TimeValue movieDuration;
  49.     TimeValue trackDuration;
  50.     TimeValue mediaDuration;
  51.     Fixed effectiveRate;
  52.     TimeBase timeBase;
  53.     short volume;
  54.     Fixed width;
  55.     Fixed height;
  56.     MatrixRecord trackMovieMatrix;
  57.     CGrafPtr moviePort;
  58.     GDHandle movieGD;
  59.     PixMapHandle trackMatte;
  60. } GetMovieCompleteParams;
  61.  
  62. enum {
  63.     kMediaInitializeSelect = 0x500 + 1,
  64.     kMediaSetHandlerCapabilitiesSelect = 0x500 + 2,
  65.     kMediaIdleSelect = 0x500 + 3,
  66.     kMediaGetMediaInfoSelect = 0x500 + 4,
  67.     kMediaPutMediaInfoSelect = 0x500 + 5,
  68.     kMediaSetActiveSelect = 0x500 + 6,
  69.     kMediaSetRateSelect = 0x500 + 7,
  70.     kMediaGGetStatusSelect = 0x500 + 8,
  71.     kMediaTrackEditedSelect = 0x500 + 9,
  72.     kMediaSetMediaTimeScaleSelect = 0x500 + 10,
  73.     kMediaSetMovieTimeScaleSelect = 0x500 + 11,
  74.     kMediaSetGWorldSelect = 0x500 + 12,
  75.     kMediaSetDimensionsSelect = 0x500 + 13,
  76.     kMediaSetClipSelect = 0x500 + 14,
  77.     kMediaSetMatrixSelect = 0x500 + 15,
  78.     kMediaGetTrackOpaqueSelect = 0x500 + 16,
  79.     kMediaSetGraphicsModeSelect = 0x500 + 17,
  80.     kMediaGetGraphicsModeSelect = 0x500 + 18,
  81.     kMediaGSetVolumeSelect = 0x500 + 19,
  82.     kMediaSetSoundBalanceSelect = 0x500 + 20,
  83.     kMediaGetSoundBalanceSelect = 0x500 + 21,
  84.     kMediaGetNextBoundsChangeSelect = 0x500 + 22,
  85.     kMediaGetSrcRgnSelect = 0x500 + 23,
  86.     kMediaPrerollSelect = 0x500 + 24
  87. };
  88.  
  89. #ifdef __cplusplus
  90. extern "C" {
  91. #endif __cplusplus
  92.  
  93. pascal ComponentResult MediaInitialize (ComponentInstance ci, GetMovieCompleteParams *gmc) 
  94.     = {0x2f3c,4,1+0x500,0x7000,0xA82A};
  95. pascal ComponentResult MediaSetHandlerCapabilities (ComponentInstance ci, long flags, long flagsMask ) 
  96.     = {0x2f3c,8,2+0x500,0x7000,0xA82A};
  97. pascal ComponentResult MediaIdle (ComponentInstance ci, TimeValue atMediaTime, long flagsIn, long *flagsOut, const TimeRecord *movieTime) 
  98.     = {0x2f3c,16,3+0x500,0x7000,0xA82A};
  99. pascal ComponentResult MediaGetMediaInfo (ComponentInstance ci, Handle h ) 
  100.     = {0x2f3c,4,4+0x500,0x7000,0xA82A};
  101. pascal ComponentResult MediaPutMediaInfo (ComponentInstance ci, Handle h ) 
  102.     = {0x2f3c,4,5+0x500,0x7000,0xA82A};
  103. pascal ComponentResult MediaSetActive (ComponentInstance ci, Boolean enableMedia ) 
  104.     = {0x2f3c,2,6+0x500,0x7000,0xA82A};
  105. pascal ComponentResult MediaSetRate (ComponentInstance ci, Fixed rate ) 
  106.     = {0x2f3c,4,7+0x500,0x7000,0xA82A};
  107. pascal ComponentResult MediaGGetStatus (ComponentInstance ci, ComponentResult *statusErr ) 
  108.     = {0x2f3c,4,8+0x500,0x7000,0xA82A};
  109. pascal ComponentResult MediaTrackEdited (ComponentInstance ci ) 
  110.     = {0x2f3c,0,9+0x500,0x7000,0xA82A};
  111. pascal ComponentResult MediaSetMediaTimeScale (ComponentInstance ci, TimeScale newTimeScale ) 
  112.     = {0x2f3c,4,10+0x500,0x7000,0xA82A};
  113. pascal ComponentResult MediaSetMovieTimeScale (ComponentInstance ci, TimeScale newTimeScale ) 
  114.     = {0x2f3c,4,11+0x500,0x7000,0xA82A};
  115. pascal ComponentResult MediaSetGWorld (ComponentInstance ci, CGrafPtr aPort, GDHandle aGD) 
  116.     = {0x2f3c,8,12+0x500,0x7000,0xA82A};
  117. pascal ComponentResult MediaSetDimensions (ComponentInstance ci, Fixed width, Fixed height) 
  118.     = {0x2f3c,8,13+0x500,0x7000,0xA82A};
  119. pascal ComponentResult MediaSetClip (ComponentInstance ci, RgnHandle theClip) 
  120.     = {0x2f3c,4,14+0x500,0x7000,0xA82A};
  121. pascal ComponentResult MediaSetMatrix (ComponentInstance ci, MatrixRecord *trackMovieMatrix) 
  122.     = {0x2f3c,4,15+0x500,0x7000,0xA82A};
  123. pascal ComponentResult MediaGetTrackOpaque (ComponentInstance ci, Boolean *trackIsOpaque ) 
  124.     = {0x2f3c,4,16+0x500,0x7000,0xA82A};
  125. pascal ComponentResult MediaSetGraphicsMode (ComponentInstance ci, long mode, RGBColor *opColor ) 
  126.     = {0x2f3c,8,17+0x500,0x7000,0xA82A};
  127. pascal ComponentResult MediaGetGraphicsMode (ComponentInstance ci, long *mode, RGBColor *opColor ) 
  128.     = {0x2f3c,8,18+0x500,0x7000,0xA82A};
  129. pascal ComponentResult MediaGSetVolume (ComponentInstance ci, short volume ) 
  130.     = {0x2f3c,2,19+0x500,0x7000,0xA82A};
  131. pascal ComponentResult MediaSetSoundBalance (ComponentInstance ci, short balance) 
  132.     = {0x2f3c,2,20+0x500,0x7000,0xA82A};
  133. pascal ComponentResult MediaGetSoundBalance (ComponentInstance ci, short *balance ) 
  134.     = {0x2f3c,4,21+0x500,0x7000,0xA82A};
  135. pascal ComponentResult MediaGetNextBoundsChange (ComponentInstance ci, TimeValue *when ) 
  136.     = {0x2f3c,4,22+0x500,0x7000,0xA82A};
  137. pascal ComponentResult MediaGetSrcRgn (ComponentInstance ci, RgnHandle rgn, TimeValue atMediaTime ) 
  138.     = {0x2f3c,8,23+0x500,0x7000,0xA82A};
  139. pascal ComponentResult MediaPreroll (ComponentInstance ci, TimeValue time, Fixed rate ) 
  140.     = {0x2f3c,8,24+0x500,0x7000,0xA82A};
  141. pascal ComponentResult MediaSampleDescriptionChanged (ComponentInstance ci, long index )
  142.     = {0x2f3c,4,25+0x500,0x7000,0xA82A};
  143. pascal ComponentResult MediaHasCharacteristic (ComponentInstance ci, OSType characteristic, Boolean *hasIt )
  144.     = {0x2f3c,8,26+0x500,0x7000,0xA82A};
  145.  
  146.  
  147. #ifdef __cplusplus
  148. }
  149. #endif __cplusplus
  150.  
  151. #endif __MEDIAHANDLER__
  152.